package com.xiongda.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 用户评论类
 *
 * @author 缪琼
 */
public class Comment {
    private Long id;// id

    private Long userId;// 用户id

    private String userNikeName;// 用户昵称

    private String userHeadPicture;// 用户头像

    private String replyUserNikeName;// 回复用户昵称

    private Date createTime;// 创建时间

    private Date updateTime;// 更新时间

    private Integer delFlag;// 逻辑删除标识

    private Integer praise;// 点赞

    // 扩展字段
    private List list = new ArrayList();// 用户存放需要返回给页面的实例
    private int index;// 楼层号
    private Long replyFloorId;// 楼层id
    private Long replyCommentId;// 回复的评论id
    private Long blogId;// 博客id

    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public Long getReplyFloorId() {
        return replyFloorId;
    }

    public void setReplyFloorId(Long replyFloorId) {
        this.replyFloorId = replyFloorId;
    }

    public Long getReplyCommentId() {
        return replyCommentId;
    }

    public void setReplyCommentId(Long replyCommentId) {
        this.replyCommentId = replyCommentId;
    }

    public Long getBlogId() {
        return blogId;
    }

    public void setBlogId(Long blogId) {
        this.blogId = blogId;
    }

    public Comment(Long id, Long userId, String userNikeName, String userHeadPicture, String replyUserNikeName, Date createTime, Date updateTime, Integer delFlag, Integer praise) {
        this.id = id;
        this.userId = userId;
        this.userNikeName = userNikeName;
        this.userHeadPicture = userHeadPicture;
        this.replyUserNikeName = replyUserNikeName;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.delFlag = delFlag;
        this.praise = praise;
    }

    public Comment() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserNikeName() {
        return userNikeName;
    }

    public void setUserNikeName(String userNikeName) {
        this.userNikeName = userNikeName == null ? null : userNikeName.trim();
    }

    public String getUserHeadPicture() {
        return userHeadPicture;
    }

    public void setUserHeadPicture(String userHeadPicture) {
        this.userHeadPicture = userHeadPicture == null ? null : userHeadPicture.trim();
    }

    public String getReplyUserNikeName() {
        return replyUserNikeName;
    }

    public void setReplyUserNikeName(String replyUserNikeName) {
        this.replyUserNikeName = replyUserNikeName == null ? null : replyUserNikeName.trim();
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getPraise() {
        return praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }
}